<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="layout::head('首页')">
    <style th:inline="text">
        body{
            background: url("[[@{/}]]img/1.jpg");
        }
    </style>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div th:replace="~{layout::header}"></div>
<div class="container" style="margin-left:400px">
<table class="table table-hover" border="1" width="1000">
    <tr>
        <th>图书 id</th> <th>图书名</th>  <th>图书 ISBN 号</th>  <th>作者</th> <th>出版社</th> <th>价格</th><th>类别</th>  <th>操作</th> <th>操作</th>
    </tr>

    <tr th:each="book : ${list}">
        <th scope="row" th:text="${book.getId()}">id未知</th>
        <td th:text="${book.getName()}">名称未知</td>
        <td th:text="${book.getIsbn()}">isbn未知</td>
        <td th:text="${book.getAuthor()}">作者未知</td>
        <td th:text="${book.getPublish()}">出版社未知</td>
        <td th:text="${book.getPrice()}">价格未知</td>
        <td th:text="${book.getCategory().getName()}">类别未知</td>
        <td><a th:href="@{/book/edit/{id}(id=${book.getId()})}">编辑</a></td>
        <td><a th:href="@{/book/delete/{id}(id=${book.getId()})}">删除</a></td>
    </tr>

    <a  href="/book/list"  >回到首页</a></br></br></br>
</table>
</div>
</body>
</html>